/*
 * Project : Linuxbox
 * File    : AdminLogin.java
 * Version : 1.0
 * Author  : Kevin Zhang
 *
 * Copyright (c) 2000-2001 by Linuxbox, Inc.
 * All rights reserved.
 */
package linuxbox.system.servlet;

import javax.servlet.http.*;

import linuxbox.common.*;
import linuxbox.admin.logic.*;

public class AdminLogoutAction extends Action {
  protected static String successJSP = null;

    public void doAction(HttpSession aSession, BoxSession aBoxSession,
    HttpServletRequest req, HttpServletResponse res) throws Exception {
        UserManager.getInstance().userLogout(aBoxSession.getID());
        aSession.invalidate();
//		res.sendRedirect(successJSP);

        if (logger.isDebugEnabled())
          logger.debug("Logout and redirect to " + successJSP);

        sendNoneJspFile(successJSP, req, res);
//        redirectFile(successJSP, req, res);
  }

  public void setSuccessJSP(String str) {
    successJSP = str;
  }
}
